package bg.btanev.eightyfour.shared.command.profile;

import bg.btanev.eightyfour.shared.command.CommandInput;
import bg.btanev.eightyfour.shared.dto.TargetDto;
import bg.btanev.eightyfour.shared.dto.profile.ProfileDto;
import bg.btanev.eightyfour.shared.dto.profile.ProfileEventDto;

/**
 *
 * @author B.Tanev
 *
 */
public class UpdateProfileInput implements CommandInput {
	private TargetDto targetDto;
	private ProfileDto<? extends ProfileEventDto> profile;

	public TargetDto getTargetDto() {
		return targetDto;
	}

	public void setTargetDto(TargetDto targetDto) {
		this.targetDto = targetDto;
	}

	public ProfileDto<? extends ProfileEventDto> getProfile() {
		return profile;
	}

	public void setProfile(ProfileDto<? extends ProfileEventDto> profile) {
		this.profile = profile;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((profile == null) ? 0 : profile.hashCode());
		result = prime * result + ((targetDto == null) ? 0 : targetDto.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		UpdateProfileInput other = (UpdateProfileInput) obj;
		if (profile == null) {
			if (other.profile != null)
				return false;
		} else if (!profile.equals(other.profile))
			return false;
		if (targetDto == null) {
			if (other.targetDto != null)
				return false;
		} else if (!targetDto.equals(other.targetDto))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "UpdateProfileInfo [profile=" + profile + ", targetDto=" + targetDto + "]";
	}
}
